/*
一次性给服务器发送多条的信息！然后查看服务器的处理结果！
然后每一个请求都要正常的处理
*/
#include"../src/server.hpp"
int main()
{
    Socket cli_sock;
    cli_sock.CreateClient(8888, "127.0.0.1");
    std::string req = "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    req += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    req += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    req += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";


    while (1)
    {
        int ret = cli_sock.Send(req.c_str(), req.size());
        assert(ret != -1);
        char buf[1024] = {0};
        assert(cli_sock.Recv(buf, 1023));
        DBG_LOG("[%s]", buf);
    }
    cli_sock.Close();
    exit(0);
    while (1)
    {
        sleep(1);
    }
    return 0;
}